package com.cci.kangdao.wechatOrder.service;

import com.cci.kangdao.wechatOrder.dto.request.WeChatJsConfigRequest;
import com.cci.kangdao.wechatOrder.model.wx.PushMessage;
import com.cci.kangdao.wechatOrder.model.wx.WxResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * @description: 微信接口服务
 * @author: zyf
 * @create: 2021-03-11
 */

public interface IWxChatSdkService {
    /**
     * 获取token
     */
    String getToken(Long companyID)throws Exception;

    /**
     * 推送微信消息模板
     * @param companyID
     * @param pm
     * @return
     */
    WxResult wxPushMessage(Long companyID,PushMessage pm)throws Exception;


    Map<String,String> getOpenId(Long companyID, String code)throws Exception;

    /**
     *
     * @param request
     * @return
     * @throws Exception
     */
    /**
     *
     * @param configRequest
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    Map<String,String> getJsConfig(WeChatJsConfigRequest configRequest, HttpServletRequest request,
                                   HttpServletResponse response)throws Exception;

}
